package Deom8;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-11-19
 * Time: 22:31
 */
public class Animal {
    public Animal test() {
        System.out.println("以父类为返回类型");
        return null;
    }
}
class Dog extends Animal {
    @Override
    public Dog test() {
        System.out.println("以子类为返回类型");
        return null;
    }
}
